<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>example methods demo</title>
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
  <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
</head>
<body>
  <h1>example methods demo</h1>
  <hr>
  <div id="app">
    {{message}}
  </div>
  <script type="text/javascript">
  var app = new Vue({
    el:'#app',
    data:{
      message:'hello world!'
    },
    mounted:function(){
      $('#app').html('我是Jquery！');
    },
    methods:{
      add:function(){
        console.log('调用了构造器内部的add方法');
      }
    }
  })

  app.add();
  </script>
</body>
</html>